﻿<phone:PhoneApplicationPage
    x:Class="Organizer.HubPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP71"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    toolkit:TiltEffect.IsTiltEnabled="True"
    xmlns:my="clr-namespace:Organizer" xmlns:ViewModel="clr-namespace:Organizer.ViewModel"
    xmlns:UserControls="clr-namespace:Organizer.Views.UserControls">
    <!--d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"-->
    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>
    <!--Data context is set to sample data above and LayoutRoot contains the root grid where all other page content is placed-->

    <phone:PhoneApplicationPage.DataContext>
        <ViewModel:HubPageViewModel />
    </phone:PhoneApplicationPage.DataContext>

    <!--ресурсы страгницы. Определяем DataTemplate-->
    <phone:PhoneApplicationPage.Resources>
    </phone:PhoneApplicationPage.Resources>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->


        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,0,12,0">
            <controls:Pivot Title="{Binding Path=LocalizedResources.AppName, Source={StaticResource LocalizedStrings}}">

                <controls:PivotItem Header="news/rss">
                    <StackPanel>
                        <Button Content="{Binding Path=LocalizedResources.MainPage_RssLoadFeed, Source={StaticResource LocalizedStrings}}" HorizontalAlignment="Left" Margin="-2,6,0,0" Name="loadFeedButton" VerticalAlignment="Top" Width="273" Click="loadFeedButton_Click" />
                        <ListBox Name="feedListBox" Height="540" HorizontalAlignment="Left" Margin="9,0,0,0" VerticalAlignment="Top" Width="438" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="feedListBox_SelectionChanged">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel VerticalAlignment="Top">
                                        <TextBlock FontSize="24" Name="feedTitle" TextWrapping="Wrap" Margin="0,0,0,0" HorizontalAlignment="Left" Foreground="{StaticResource PhoneAccentBrush}" Text="{Binding Title.Text, Converter={StaticResource RssTextTrimmer}}" />
                                        <TextBlock Name="feedSummary" TextWrapping="Wrap" Margin="0,0,0,0" Text="{Binding Summary.Text, Converter={StaticResource RssTextTrimmer}}" />
                                        <TextBlock Name="feedPubDate" Foreground="{StaticResource PhoneSubtleBrush}" Margin="0,0,0,10" Text="{Binding PublishDate.DateTime}" />
                                    </StackPanel>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                        <Border BorderBrush="{StaticResource PhoneSubtleBrush}" BorderThickness="1" Height="2" HorizontalAlignment="Left" Margin="20,88,0,0" Name="border1" VerticalAlignment="Top" Width="438" />
                    </StackPanel>
                </controls:PivotItem>

                <controls:PivotItem Header="statistics">
                </controls:PivotItem>

                <controls:PivotItem Header="learning">
                </controls:PivotItem>

                <controls:PivotItem Header="forismatic">
                    <UserControls:ForismaticCitesView VerticalAlignment="Stretch" />
                </controls:PivotItem>
            </controls:Pivot>
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>